home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 7
/
007.d81
/
super keno
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
180 lines
50 rem ** s u p e r k e n o **
60 rem for commodore 64
70 rem written by max a. chapman
80 rem 628 ibis lane, reno nv 89503
90 rem (702) 747-3306
95 rem revision 9/26/84
100 goto620
110 v=int(rnd(.)*80)+1:ifa%(v)=1then110
120 a%(v)=1:q=q+1:q$=mid$(str$(q),2)
130 printleft$(b$,24)tab(25)chr$(156)q$
140 fori=1to10:ifv<>f(i)thennext:goto210
150 printleft$(b$,24)tab(25)chr$(158)q$
160 mt=mt+1:r=1106:ifv>40thenr=1146
170 l=int(v/10):g=v-(l*10):ifg=0theng=10:l=l-1
180 t=(l*80)+(g*3)+r:z=250:poket,z:poket+1,z
190 pokeu+4,17:fori=0to2:forj=50to20step-2:pokeu,i:pokeu+1,j:next:next
200 t=t+u:d=2:poket,d:poket+1,d:gosub320:pokeu+4,16:goto260
210 pokeu,15:pokeu+1,15:pokeu+4,17:r=1106:ifv>40thenr=1146
220 l=int(v/10):g=v-(l*10):m=l+176:z=g+176:ifv<10thenm=160
230 ifg=0theng=10:l=l-1
240 t=(l*80)+(g*3)+r:poket,m:poket+1,z:t=t+u
250 ford=1to7:poket,d:t=t+1:poket,d:t=t-1:next:pokeu+4,16
260 wt$=str$(wt)
270 printb$chr$(159)spc(4)"[211]pots:"s;tab(15)"[200]its:"mt;tab(25)"[215]in: $"wt$"[145]"
280 fori=1to40:next:rem ***** sets pace of game *****
290 e(v)=e(v)+1
300 ifq<20then110
310 return
320 ifs=4andmt=2ors=9andmt=4ors=6andmt=3ors=7andmt=3thenwt=2
330 ifs=8andmt=4thenwt=3
340 ifs=7andmt=4ors=4andmt=3ors=5andmt=3thenwt=5
350 ifs=10andmt=5thenwt=8
360 ifs=6andmt=4ors=7andmt=5ors=9andmt=5thenwt=10
370 ifs=8andmt=5thenwt=12
380 ifs=5andmt=4ors=9andmt=6ors=10andmt=6thenwt=25
390 ifs=4andmt=4ors=6andmt=5ors=10andmt=7thenwt=50
400 ifs=5andmt=5ors=7andmt=6ors=8andmt=6ors=9andmt=7ors=10andmt=8thenwt=100
410 ifs=6andmt=6ors=7andmt=7ors=8andmt=7thenwt=500
420 ifs=9andmt=8ors=10andmt=9thenwt=1000
430 ifs=8andmt=8ors=9andmt=9ors=10andmt=10thenwt=5000
440 return
450 getpb$:ifpb$=""then450
460 return
470 printspc(4)"[171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";gg$;:return
480 bs=bs+1
490 forby=azto35:forbt=bzto10
500 printtab(by)k$(bt,bs);:by=by+5:next:next:print
510 printchr$(30)"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"chr$(154):return
520 h=0:printleft$(b$,24)tab(13)" "chr$(145):return
530 printleft$(b$,24)" [193]utorun? (y/n)";
540 gosub450:zx$=pb$:ifzx$<>"y"thenreturn
550 printleft$(b$,24);:input" [200]ow many games (1 to 5000)";zy$
560 zy=val(zy$):zy=int(zy):zz=ga+(zy-1):ifzy>0andzy<=5000thenreturn
570 printleft$(b$,24)" not acceptable! try again "
580 fori=1to2000:next:goto550
590 printleft$(b$,24)chr$(156)tab(6)"clear total winnings? (y/n)"
600 gosub450:tw$=pb$:iftw$<>"y"thenreturn
610 wn=0:printchr$(19)chr$(18)chr$(129)tab(29)" ":return
620 dime(80):dima%(80):u=54272:pokeu-1000,23:fort=utou+24:poket,0:next
630 gg$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":rem 35 cursor lefts,cursor down
640 b$="":rem home, rvs, 24 cursor downs
650 poke53280,8:poke53281,0
660 poke53281,0:printchr$(147)chr$(18)chr$(129);:fori=0to39:print" ";:next
670 fori=0to4:printchr$(30)"keno[129] pick your numbers keno[129] ";
680 printchr$(31)" the more you match, [129] ";
690 printchr$(156)" the more you win [129] ";
700 printchr$(150)" [129] ";:next
710 ifp$="n"orp$="h"thenp$="":goto740
720 printchr$(158)" [215]ritten by [205]ax [193]. [195]hapman "
730 poke2023,160:poke56295,0:fori=1to4000:next
740 pokeu+23,0:pokeu+24,15:pokeu+5,0:pokeu+6,120
750 c=0:s=0:h=0:fori=1to10:f(i)=0:next
760 q=0:wt=0:forv=1to80:a%(v)=0:next:ga=ga+1:mt=0
770 printchr$(19)chr$(129)chr$(18)spc(4)"[199]ame:"ga;tab(17)"[212]otal [215]in: $"wn
780 printchr$(145)chr$(154)chr$(18);
790 printspc(4)"[176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]";gg$;
800 printspc(4)"[221] 1[221] 2[221] 3[221] 4[221] 5[221] 6[221] 7[221] 8[221] 9[221]10[221]";gg$;:gosub470
810 printspc(4)"[221]11[221]12[221]13[221]14[221]15[221]16[221]17[221]18[221]19[221]20[221]";gg$;:gosub470
820 printspc(4)"[221]21[221]22[221]23[221]24[221]25[221]26[221]27[221]28[221]29[221]30[221]";gg$;:gosub470
830 printspc(4)"[221]31[221]32[221]33[221]34[221]35[221]36[221]37[221]38[221]39[221]40[221]";gg$;
840 printspc(4)"[173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]";gg$;
850 printspc(4)"[176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]";gg$;
860 printspc(4)"[221]41[221]42[221]43[221]44[221]45[221]46[221]47[221]48[221]49[221]50[221]";gg$;:gosub470
870 printspc(4)"[221]51[221]52[221]53[221]54[221]55[221]56[221]57[221]58[221]59[221]60[221]";gg$;:gosub470
880 printspc(4)"[221]61[221]62[221]63[221]64[221]65[221]66[221]67[221]68[221]69[221]70[221]";gg$;:gosub470
890 printspc(4)"[221]71[221]72[221]73[221]74[221]75[221]76[221]77[221]78[221]79[221]80[221]";gg$;
900 printspc(4)"[173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]";gg$;
910 ifp$="k"thenfori=1tos:h=f(i):goto1060
920 fori=0to238:print"[129] ";:next:poke2023,160:poke56295,8
930 printleft$(b$,22)chr$(18);:input" [200]ow many spots (4 to 10)";s$
940 s=val(s$):s=int(s):ifs>10ors<4then770
950 pokeu,45:pokeu+1,45:pokeu+4,17:fori=1to65:next:pokeu+4,16
960 pokeu,0:pokeu+1,0
970 c=c+1
980 cc$="th":ifc=1thencc$="st"
990 ifc=2thencc$="nd"
1000 ifc=3thencc$="rd"
1010 c$=str$(c):printchr$(18)spc(1)c$cc$;
1020 input" [206]umber";h$
1030 h=val(h$):h=int(h):ifh<1orh>80thengosub520:goto980
1040 ifh=f(1)orh=f(2)orh=f(3)orh=f(4)orh=f(5)thengosub520:goto980
1050 ifh=f(6)orh=f(7)orh=f(8)orh=f(9)orh=f(10)thengosub520:goto980
1060 pokeu,35:pokeu+1,35:d=1:pokeu+4,17:r=1106:ifh>40thenr=1146
1070 l=int(h/10):g=h-(l*10):m=l+48:z=g+48:ifh<10thenm=32
1080 ifg=0theng=10:l=l-1
1090 t=(l*80)+(g*3)+r:poket,m:poket+1,z:t=t+u:poket,d:poket+1,d:pokeu+4,16
1100 ifp$="k"thenifi=sthen1170
1110 ifp$="k"thennext:goto1060
1120 pokeu,0:pokeu+1,0
1130 printleft$(b$,24)chr$(129)" "chr$(145)chr$(145)
1140 f(c)=h:ifc<sthen970
1150 gosub530:printleft$(b$,21)chr$(30)spc(2);
1160 ons-3gosub1340,1360,1380,1400,1420,1440,1460
1170 printleft$(b$,24)chr$(156)spc(1)" [199]ood [204]uck!! "
1180 v=rnd(-ti):gosub110
1190 poke198,0:ifwt>0thenwn=wn+wt:printchr$(18)chr$(19)chr$(129)tab(29)wn
1200 fori=10to40step5:pokeu+4,17:pokeu,i:pokeu+1,i
1210 forj=1to100:next:next:pokeu+4,16:pokeu,0:pokeu+1,0:gosub1570
1220 ifzx$="y"andzz=gathenzx$="":gosub590:tw$="":goto1270
1230 ifzx$="y"thenprintleft$(b$,24)tab(10)chr$(156)"autorun to game"zz
1240 ifzx$="y"thenfori=1to1000:next:p$="k":goto1300
1250 printleft$(b$,24)chr$(150)spc(1)" g a m e o v e r "
1260 fori=1to500:next
1270 printleft$(b$,24)spc(1)"[154][146]keep/[146]clear ticket or see [146]numbers/[146]hits"
1280 fori=1to1900:next
1290 getp$:ifp$=""then1250
1300 ifp$="k"thenprintb$tab(21)chr$(159)"0[129] "tab(32)chr$(159)"0[129] [145]":goto760
1310 ifp$="n"thengosub1480:gosub1790:goto650
1320 ifp$="h"thengosub1580:gosub1760:goto650
1330 goto750
1340 print" [205]atch: 4=$50 3=$5 "
1350 printchr$(18)spc(2)" 2=$2 ":return
1360 print" [205]atch: 5=$100 4=$25 "
1370 printchr$(18)spc(2)d" 3=$5 ":return
1380 print" [205]atch: 6=$500 5=$50 "
1390 printchr$(18)spc(2)" 4=$10 3=$2 ":return
1400 print" [205]atch: 7=$500 6=$100 "
1410 printchr$(18)spc(2)" 5=$10 4=$5 3=$2 ":return
1420 print" [205]atch: 8=$5,000 7=$500 "
1430 printchr$(18)spc(2)" 6=$100 5=$12 4=$3 "